<?php

class Help extends Controller {

    function __construct() {
        parent::__construct();
        //echo 'We are in help controll';
        $this->view->msg = 'This for help';
        $this->loadModel('help');
    }

    function index(){

        /*$data = $this->model->getData();
        if (isset($data['loggedIn']) && $data['loggedIn']){
            $this->view->assign('loggedIn', true);
            $this->view->assign('userName', $data['userName']);
            $this->view->render('index/loginSuccess');

        }else{
            $this->view->render('index/index');
        }*/

        if (Session::get('loggedIn')){
            $this->view->render('help/index');
        }else{
            header('Location: ./index.php');
        }

    }

    public function getRunTimeJessiMsg(){
        $content =  "<h2>我願意 ...</h2>";
        $content .='﻿<div class="box full">
                        <div style="margin:0 auto; width: 634px; height:120px;">
                            <!-- "previous page" action -->
                            <!--a class="prev browse left"></a-->

                            <!-- root element for scrollable -->
                            <div id="autoscroll" class="scrollable">
                                <!-- root element for the items -->
                                <div class="items" style="left: -2040px;">';

        for($i = 1; $i < 16; $i++){
            $content .= ' <div>
                               <img src="'.URL.'public/media/images/wo'.$i.'.jpg" alt="" />

                          </div>';
        }




            $content .='      </div>

                            </div>
                        </div>
                        <br clear="all">
                    </div>';
        $size = Helper::getJessiVideoSize();
        $content .= '<div class="cacsTxt" style="padding-top: 20px;text-align: center;">';
        $content .= '<iframe width="'.$size['w'].'" height="'.$size['h'].'" src="http://www.youtube.com/embed/gt-W8qJbNyc?rel=0&autoplay=1" frameborder="0" allowfullscreen></iframe>';
        $content .= '</div>';
        $content .= '<div class="cacsTxt" style="padding-top: 20px;text-align: center;">';
        $content .='<font style="font-size:14px;color:#C62828">思念是一種很玄的東西　如影隨行<br>無聲又無息出沒在心底　轉眼　吞沒我在寂寞裡<br><br>我無力抗拒　特別是夜裡　想你到無法呼吸<br>恨不能立即　朝你狂奔去　大聲的告訴你<br><br>願意為你　我願意為你<br><br>我願意為你　忘記我姓名<br>就算多一秒　停留在你懷裡　失去世界也不可惜<br><br>願意為你　我願意為你<br>我願意為你　被放逐天際<br>只要你真心　拿愛與我回應<br>什麼都願意　什麼都願意　為你<br><br>我什麼都願意　什麼都願意　為你<br><br>
</font>';

        $content .='</div>';
        return $content;

    }

    public function getRunTimeJessiFooterMsg(){
        // si nian
        return '';

        $size = Helper::getJessiVideoSize();
        return '<iframe width="'.$size['w'].'" height="'.$size['h'].'" src="http://www.youtube.com/embed/gt-W8qJbNyc?rel=0&autoplay=1" frameborder="0" allowfullscreen></iframe>';

    }



}